package qy.qyalgotrader.utils.plotter;

import qy.jalgotrade.bar.Bar.Frequency;

/**
 * @author c-geo
 *
 */
public class RealtimeMACDMarker extends RealtimeHistogramMarker {

	/**
	 * 
	 * @param frequency frequency
	 */
	public RealtimeMACDMarker(Frequency frequency) {

		this(frequency, null);
	}

	/**
	 * @param frequency frequency
	 * @param label label
	 */
	public RealtimeMACDMarker(Frequency frequency, String label) {

		super(frequency, label);
	}

	/*
	 * (non-Javadoc)
	 * @see qy.jalgotrade.utils.plotter.HistogramMarker#getColorForValue(java.lang.Double, java.lang.String)
	 */
	@Override
	public String getColorForValue(Double value, String defaultColor) {

		String ret = defaultColor;
		if (value >= 0) { // XXX: qy-pyalgotrade: red for long, green for short
			ret = "r";
		} else {
			ret = "g";
		}
		return ret;
	}
}
